
/**
 * @author wangpeizhi
 */
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: {
      dictCode
    }
  })
}
/**
 * 查询分类列表-启用状态
 * @param {*} query
 */
export function query(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/hyTemplateManage/query',
    method: 'post',
    data
  })
}

/**
 * 查询分类列表-全部
 * @param {*} query
 */
export function queryAll(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/hyTemplateManage/queryByType',
    method: 'post',
    data
  })
}

/**
 * 删除分类
 * @param {*} id
 */
export function del(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/hyTemplateManage/deleteByIds',
    method: 'get',
    params: { ids }
  })
}
/**
 * 添加编辑新闻分类
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/hyTemplateManage/insert',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/hyTemplateManage/update',
    method: 'post',
    data
  })
}

